When fabricating field effect transistors (FETs), such as fin-like FETs (FinFETs), device performance can be improved by using a metal gate electrode instead of a polysilicon gate electrode. Formation of the metal gate electrode may include sequentially forming a gate dielectric layer, a barrier layer, a work function layer, and a metal liner layer in a high aspect ratio trench, followed by the trench filling with a gate material. The work function layer may use different materials for different types of transistors, such as p-type FinFET or n-type FinFET, to fine tune threshold voltage (Vt) of the transistor and thus enhance device electrical performance as needed. However, with the decreasing in scaling, new challenges are presented.